package gui;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;

import entities.Student;

/**
 * Construct a panel for the financial information of the student
 */
class EmployeeFinInfoPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	public EmployeeFinInfoPanel(Student student) {
		setBorder(new TitledBorder(new EtchedBorder(), "Financial Information"));
		setLayout(new GridLayout(8, 1));
		// setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));

		JLabel householdIncome = new JLabel("Household Income: $"
				+ student.getFinances().getHouseholdIncome());
		add(householdIncome);
		JLabel personalIncome = new JLabel("Personal Income: $"
				+ student.getFinances().getPersonalIncome());
		add(personalIncome);
		JLabel scholarship = new JLabel("Scholarship Amount: $"
				+ student.getFinances().getScholarship());
		add(scholarship);
		JLabel taxableEarnings = new JLabel("Taxable Earnings: $"
				+ student.getFinances().getTaxableEarnings());
		add(taxableEarnings);
		JLabel monthlyExpenses = new JLabel("Monthly Expenses: $"
				+ student.getFinances().getMonthlyExpenses());
		add(monthlyExpenses);
		JLabel childSupport = new JLabel("Child Support: $"
				+ student.getFinances().getChildSupport());
		add(childSupport);
	}
}
